added Feb 2001 SDK
[windows-sources.git] / shared source / wpf / src / host / shimimpl / version.hxx
blobd934c50b72f6d8be9ee245ff08db6cf98b62fa3e
1 //------------------------------------------------------------------------
2 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 //
5 // Description:
6 // Defines the connection to PresentationHostDLL.dll
7 //
8 // History:
9 // 2005/05/09 - [....]
10 // Created
11 // 2007/09/20-[....]
12 // Ported Windows->DevDiv. See SourcesHistory.txt.
14 //------------------------------------------------------------------------
16 #pragma once
18 class CVersion
20 public:
21 CVersion(__in_ecount(1) LPCWSTR pswzVersion);
22 ~CVersion() {}
24 public:
25 BOOL IsValid() { return m_bIsValid; }
26 BOOL IsAttached() { return m_bIsAttached; }
27 HRESULT Attach();
29 STRING_PROP(Value);
30 DWORD Major() const { return m_dwMajor; }
31 DWORD Minor() const { return m_dwMinor; }
32 STRING_PROP(LibraryPath);
34 int CompareTo(__in_ecount(1) CVersion* pOther);
36 // Invokes Watson and terminates on failure
37 void Activate(__in_ecount(1) const struct ActivateParameters* pParameters, __deref_out_ecount(1) LPUNKNOWN* ppInner);
38 void Deactivate();
39 HRESULT ForwardTranslateAccelerator(__in_ecount(1) MSG* pMsg);
40 HRESULT SaveToHistory(__in_ecount(1) IStream* pHistoryStream);
41 HRESULT LoadFromHistory(__in_ecount(1) IStream* pHistoryStream, __in_ecount(1) IBindCtx* pBindCtx);
43 private:
44 void ParseVersion(__in_ecount(1) LPCWSTR pswzVersion);
46 private:
47 typedef void (*ActivatePfn)(__in_ecount(1) const ActivateParameters* pParameters, __deref_out_ecount(1) LPUNKNOWN* ppInner);
48 typedef void (*DeactivatePfn)();
49 typedef HRESULT (*ForwardTranslateAcceleratorPfn)(__in_ecount(1) MSG* pMsg, VARIANT_BOOL appUnhandled);
50 typedef HRESULT (*SaveToHistoryPfn)(__in_ecount(1) IStream* pHistoryStream);
51 typedef HRESULT (*LoadFromHistoryPfn)(__in_ecount(1) IStream* pHistoryStream, __in_ecount(1) IBindCtx* pBindCtx);
53 DWORD m_dwMajor;
54 DWORD m_dwMinor;
55 DWORD m_dwBuild;
57 HINSTANCE m_hInstance;
58 CString m_strValue;
59 CString m_strLibraryPath;
61 BOOL m_bIsValid;
62 BOOL m_bIsAttached;
63 ActivatePfn m_pfnActivate;
64 DeactivatePfn m_pfnDeactivate;
65 ForwardTranslateAcceleratorPfn m_pfnForwardTranslateAccelerator;
66 SaveToHistoryPfn m_pfnSaveToHistory;
67 LoadFromHistoryPfn m_pfnLoadFromHistory;